<?php

namespace App\Models;

class QuestionModel extends BaseModel
{

    protected $table = 'cm_question';

    public function subject()
    {
        return $this->belongsTo(SubjectModel::class, 's_id', 'id');
    }

    public function courseType()
    {
        return $this->belongsTo(CourseTypeModel::class, 't_id', 'id');
    }

    public function userLike()
    {
        return $this->hasOne(UserLikeModel::class, 'q_id', 'id');
    }
}
